<template>
	<view>
		<van-cell-group v-for="(item,index) in finishList.list" title="签到情况">
			<van-cell :title="item.executorInfo.name" :value="item.statusEnum" />
		</van-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				finishList: {
					"status": 1,
					"message": null,
					"data": null,
					"list": [{
						"id": 1,
						"executorId": 3,
						"executorInfo": {
							"id": 3,
							"name": "卢斌",
							"orgName": null,
							"teleNumber": null,
							"userIdentityEnum": "ADMINISTRATOR",
							"oneCollector": false,
							"oneExecutor": false,
							"oneAdministrator": true
						},
						"signId": 1,
						"signEnt": null,
						"statusEnum": "WAITING"
					}],
					"pageNum": 1,
					"pageSize": 1,
					"totalPage": 1,
					"firstPage": true,
					"lastPage": true
				},
				id:0
			}
		},
		methods: {
			finishProcess(){
				uni.request({
					url: this.apiurl + '/sign/finish_process', //仅为示例，并非真实接口地址。
					header: {
						'Authorization': uni.getStorageSync('token') //自定义请求头信息
					},
					data: {
						signId:this.id,
						pageNum: 1,
						pageSize: 20
					},
					success: (res) => {
						console.log(res.data)
						this.finishList = res.data
					}
				});
			}
		},
		onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数
			console.log(option.id); //打印出上个页面传递的参数。
			this.id = option.id
			this.finishProcess()
		}
	}
</script>

<style>

</style>
